package org.ohos.rajawali3d.examples.recycler;

import com.jcodecraeer.xrecyclerview.XRecyclerView;
import ohos.agp.components.Component;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.Text;
import ohos.app.Context;
import org.ohos.rajawali3d.ResourceTable;

import java.util.List;

@SuppressWarnings("unchecked")
public final class CategoryAdapter<T> extends XRecyclerView.RecyclerAdapter<T> {


    public CategoryAdapter(Context context, List data, int mLayoutId) {
        super(context, data, mLayoutId);
        //mContext = context;
    }

    @Override
    public List getData() {
        return super.getData();
    }

    @Override
    public int getCount() {
        return super.getCount();
    }

    @Override
    public T getItem(int position) {
        return super.getItem(position);
    }

    @Override
    public long getItemId(int position) {
        return super.getItemId(position);
    }

    @Override
    public Component getComponent(int position, Component convertComponent, ComponentContainer parent) {
        return super.getComponent(position, convertComponent, parent);
    }

    @Override
    public void setNumColumns(int numColumns) {
        super.setNumColumns(numColumns);
    }

    @Override
    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
        super.setOnItemClickListener(onItemClickListener);
    }

    @Override
    public void bind(ViewHolder holder, T s, int position) {
        holder.<Text>getView(ResourceTable.Id_text1).setText((String) s);
    }
}
